<?php
/* @var $this FileController */
/* @var $model File */

$this->breadcrumbs = array(
	'Files'=>array('index'),
	$model->name,
);

$this->menu = array(
	array('label'=>'List File', 'url'=>array('index')),
	array('label'=>'Upload File', 'url'=>array('create')),
	array('label'=>'Update File', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete File', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete', 'id'=>$model->id), 'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage File', 'url'=>array('admin')),
);
?>

<h1>View File #<?php echo $model->id; ?></h1>

<?php
$htmlOptions = array(
	'title'=>$model->name,
);
$url = $this->createUrl('download', array('id'=>$model->id));
$value = CHtml::link('Download', $url, $htmlOptions);
$properties = array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'name',
		array(
			'label'=>$model->getAttributeLabel('size'),
			'type'=>'number',
			'value'=>$model->size,
		),
		array(
			'label'=>'File',
			'type'=>'raw',
			'value'=>$value,
		),
		array(
			'name'=>'note',
			'type'=>'ntext',
		),
	),
);
$this->widget('bootstrap.widgets.TbDetailView', $properties);
?>
